<template>
    <div>
      <ul>
        <li v-for="(item,index) in courseData" :key="index">
          <div class="left">
            <img :src="item.thumb" alt="">
            <span>{{item.title}}</span>
          </div>
          <div class="right">
            <p>{{item.tit}}</p>
            <p>
              <span>{{item.mon}}</span>
              <span>{{item.isNo}}</span>
            </p>
            <p>
              <span>{{item.anmin}}</span>
              <span>{{item.num}}已购买</span>
            </p>
          </div>
        </li>
      </ul>
    </div>
</template>

<script>
    export default {
      name: "Course",
      data(){
        return {
          courseData:[
            {thumb:require("../../../assets/img/2.jpg"),title:'音频',tit:'芭蕾舞的天下你知不知',mon:'免费',isNo:'已购买',anmin:'用户昵称',num:'12'},
            {thumb:require("../../../assets/img/2.jpg"),title:'视频',tit:'芭蕾舞的天下你知不知',mon:'免费',isNo:'已购买',anmin:'用户昵称',num:'12'},
            {thumb:require("../../../assets/img/2.jpg"),title:'专栏',tit:'芭蕾舞的天下你知不知',mon:'免费',isNo:'已购买',anmin:'用户昵称',num:'12'},
            {thumb:require("../../../assets/img/2.jpg"),title:'线下',tit:'芭蕾舞的天下你知不知',mon:'免费',isNo:'已购买',anmin:'用户昵称',num:'12'}
          ]
        }
      },
      mounted(){
        mui.back = function() {
          window.history.go(-1);
        }
      }
    }
</script>

<style scoped>
ul{
  padding: 30px 40px;
}
  ul li{
    display: flex;
    padding-bottom: 30px;
  }
ul li .left{
  position: relative;
  margin-right: 25px;
}
ul li .left img{
  width: 250px;
  height: 150px;
  border-radius: 15px;
}
ul li .left span{
  border-radius: 5px;
  position: absolute;
  left: 10px;
  top: 10px;
  width: 66px;
  height: 30px;
  font-size: 24px;
  line-height: 30px;
  text-align: center;
  color: #fff;
  background: #884ca4;
}
ul li .right{
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-grow: 1;
}
  ul li .right p:nth-child(1){
    font-size: 28px;
    font-weight: bolder;
    letter-spacing:5px;
  }
ul li .right p:nth-child(2){
  display: flex;
  justify-content: space-between;
}
ul li .right p:nth-child(2) span:nth-child(1){
  font-size: 26px;
  color: #8c8c8c;
}
ul li .right p:nth-child(2) span:nth-child(2){
  font-size: 26px;
  color: #884ca4;
}
ul li .right p:nth-child(3){
  display: flex;
  justify-content: space-between;
}
ul li .right p:nth-child(3) span{
  font-size: 28px;
}
</style>
